<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>图片浏览显示区域</title>
    <link rel="stylesheet" href="../../res/web/css/aui.css">
    <style type="text/css">
        html,
        body {
            background-color: transparent;
        }

        body {
            background-color: #ffffff;
        }

        @font-face {
            font-family: aui-iconfont;
            /*这里是说明调用来的字体名字*/
            src: url("../fonts/aui_iconfont.ttf");
            /*这里是字体文件路径*/
        }

        .aui-bar-nav {
            background-color: #fabf38;
        }

        .aui-margin-l-5 {
            margin-left: 0 !important;
        }

        .aui-content {
            border-bottom: 1px solid #f4f4f4;
        }

        .flex_cont {
            flex: 1;
            text-align: center;
            font-size: 13px;
        }

        .aui-media-list-item-inner {
            width: 100%;
            border-bottom: 1px solid #f4f4f4;
        }

        .aui-list .aui-list-item {
            padding-right: 0.75rem;
        }

        .tabChange {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            margin-bottom: 0.75rem !important;
        }

        .tabChange li {
            justify-content: center;
            text-align: center;
            flex: 1;
            display: inline-block;
        }

        .tabChange li a {
            color: #434343;
        }

        .tabChange li.avtice a {
            color: #7db0fc;
        }

        .contents {
            border-top: 1px solid #f4f4f4;
            border-bottom: 1px solid #f4f4f4;
        }

        .contents li {
            padding: 0 20px;
            display: flex;
            display: -webkit-flex;
        }

        .contents li p {
            padding: 15px 0;
            width: 100%;
            margin: 0 auto;
            display: flex;
            display: -webkit-flex;
            border-bottom: 1px solid #f4f4f4;
        }

        .contents li span {
            flex: 1 1 auto;
        }

        .contents li h2 {
            width: 100%;
            display: inline-block;
            font-size: 17px;
            margin-top: 10px;
            color: #5399f8;
        }

        .contents li .line {
            display: inline-block;
            width: 73%;
            height: 1px;
            background-color: #f4f4f4;
            line-height: 25px;
            vertical-align: middle;
        }

        .contents li .newP {
            padding: 0;
        }

        #footer-logo {
            width: 100%;
            padding: 20px;
            display: flex;
            display: -webkit-flex;
        }

        #footer-logo p {
            width: 100%;
            padding: 6px 10px;
            margin: 0 auto;
            text-align: center;
            background-color: #fabf38;
            border-radius: 20px;
            color: white;
            font-size: 17px;
        }

        /*售罄相关样式*/
        #footer-logo {
            width: 100%;
            padding: 20px;
            display: flex;
            display: -webkit-flex;
        }

        #sell-out {
            width: 100%;
            padding: 20px;
            display: flex;
            display: -webkit-flex;
        }

        #sell-out p {
            width: 100%;
            padding: 6px 10px;
            margin: 0 auto;
            text-align: center;
            background-color: #d6d6d6;
            border-radius: 20px;
            color: #6f6f6f;
            font-size: 17px;
        }

        * {
            padding: 0px;
            margin: 0px;
            font-family: Helvetica;
        }

        /*主页面状态栏及头部样式*/
        .status-bar {
            width: 100%;
            height: 24px;
        }

        #myHeader {
            width: 100%;
        }

        /*列表上拉状态样式*/
        #listState {
            width: 100%;
            padding: 15px 0px;
            text-align: center;
            background-color: #eeeeee;
            font-size: 14px;
            color: gray;
        }

        /*页面主要内容样式*/
        .container {
            width: 100%;
        }

        /*聊天界面的表情样式*/
        .aui-chat-content>span>img {
            display: inline !important;
        }

        /*"bgColor":"#1A191D",*/
        /*gold  #fabf38*/

        .h20 {
            width: 100%;
            height: 20px;
        }

        .clear {
            clear: both;
        }
    </style>
</head>

<body>
</body>
<script src="../../script/fastclick.js"></script>
<script src="../../script/jquery_three_two_one.js"></script>
<script src="../../script/browser.js"></script>
<script src="../../script/tip.js"></script>
<script src="../../script/app.js"></script>
<script>
    apiready = function () {
        var app = new APP();
        app.log("imagemain", "图片浏览显示区域");

        var isHHidden = false; // 默认header显示

        // 显示图片浏览模块
        app.showImgBrowser(api.pageParam.urls, function (ret, err) {
            app.log("showImgBrowser", ret);
            if (ret.eventType == "click") {
                isHHidden = !isHHidden;
                app.setFrame({
                    name: "image_header",
                    hidden: isHHidden
                });
            }
            if (ret.eventType == "change") {
                app.trigger("change_picture", ret);
            }
        });

        // 打开头部frame
        app.tout(100, function () {
            app.openFrame({
                name: "image_header",
                url: app.hd + "common/image_header.html",
                rect: {
                    x: 0,
                    y: 0,
                    w: app.W,
                    h: app.ohH
                },
                pageParam: {
                    imgNum: typeof api.pageParam.urls == "string" ? 1 : api.pageParam.urls.length
                }
            });
        });

        // 监听保存图片消息
        app.listen("save_picture", function () {
            app.log("save_picture", "监听到保存图片消息");
            // 获取当前图片url
            app.getCurImgUrl(function (ret) {
                if (ret) {
                    app.savePic(ret);
                } else {
                    app.toast("保存失败！");
                }
            });
        });
    }
</script>

</html>